package com.shop.milk_tea_shop.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 积分明细表：	记录用户积分和消费的明细
 * </p>
 *
 * @author yjw
 * @since 2024-06-16
 */
@TableName("point_detail_table")
@ApiModel(value = "PointDetail对象", description = "积分明细表：	记录用户积分和消费的明细")
public class PointDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("记录id")
    private Long id;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("积分操作（+/-数字）")
    private Integer operation;

    @ApiModelProperty("操作原因")
    private String reason;

    @ApiModelProperty("状态（0：不可用，1：可消费）")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getOperation() {
        return operation;
    }

    public void setOperation(Integer operation) {
        this.operation = operation;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "PointDetail{" +
            "id = " + id +
            ", userId = " + userId +
            ", operation = " + operation +
            ", reason = " + reason +
            ", status = " + status +
            ", createTime = " + createTime +
        "}";
    }
}
